package ui.viewpager;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;

public class MyViewPager extends ViewPager
{
	boolean scrollble=true;

	public MyViewPager(Context context, AttributeSet attrs)
	{
		super(context, attrs);
	}

	public MyViewPager(Context context)
	{
		super(context);
	}

	@Override
	public boolean onInterceptTouchEvent(MotionEvent arg0)
	{
		return false;
	}

	@Override
	public boolean onTouchEvent(MotionEvent ev)
	{
		if (!scrollble)
		{
			return true;
		}
		return super.onTouchEvent(ev);
	}

	public void setScrollble(boolean scrollble)
	{
		this.scrollble = scrollble;
	}

}
